<template>
  <div id="app">
    <!-- 全局loading -->
    <div class="global-loading" v-if="$store.state.loading">
      <div class="loading-content">
        <i class="el-icon-loading"></i>
        <p>正在获取最新数据...</p>
      </div>
    </div>
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App'
}
</script>

<style>
#app {
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}

.global-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.9);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loading-content {
  text-align: center;
}

.loading-content i {
  font-size: 40px;
  color: #409EFF;
  margin-bottom: 10px;
}

.loading-content p {
  color: #409EFF;
  font-size: 16px;
  margin: 10px 0 0;
}
</style> 